package com.gzx.plugin.tjzy.modular.phone.error.controller;

import com.gzx.plugin.tjzy.modular.phone.error.bo.GzxErrorPhoneAddBo;
import com.gzx.plugin.tjzy.modular.phone.error.bo.GzxErrorPhoneQueryBo;
import com.gzx.plugin.tjzy.modular.phone.error.service.GzxErrorPhoneService;
import com.gzx.plugin.tjzy.modular.phone.error.vo.GzxErrorPhoneVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import vip.xiaonuo.common.mvc.controller.BaseController;
import vip.xiaonuo.common.pojo.CommonResult;

/**
 * @author xbl
 */
@RestController
@RequestMapping("/tjzy/error/phone")
public class GzxErrorPhoneController extends BaseController<GzxErrorPhoneAddBo, GzxErrorPhoneVo, GzxErrorPhoneQueryBo, GzxErrorPhoneService> {

    public GzxErrorPhoneController(GzxErrorPhoneService baseService) {
        super(baseService);
    }

    /**
     * 异常手机号导入
     */
    @PostMapping("/importExcel")
    public CommonResult<String> importExcel(@RequestPart("errorPhoneAddBo") GzxErrorPhoneAddBo bo, @RequestPart("multipartFile") MultipartFile multipartFile) {
        return CommonResult.data(baseService.importExcel(bo, multipartFile));
    }
}
